#ifndef MYHREAD_H
#define MYHREAD_H

#include <QThread>
#include <QDebug>
#include <QString>
#include "widget.h"

class myhread : public QThread
{
    Q_OBJECT
public:
    explicit myhread(QObject *parent = 0);
    void stop();

    //pthread_mutex_t mMutex;  //定义锁
    pthread_mutex_t condMutex;  //此锁用于条件变量加减锁
    pthread_cond_t  mCond;      //此条件变量用于何时运行

protected:
    void run();

private:
    volatile bool stopped;
    Widget *mWidget;

signals:

public slots:

};

#endif // MYHREAD_H
